home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 2.iso / toolbox / public / figlet / util / zfiglet < prev   
Text File  |  1996-11-11  |  1KB  |  48 lines

  1. #!/bin/sh -
  2. # zfiglet by Glenn Chappell <ggc@uiuc.edu>
  3. # 10 May 1995
  4. #
  5. # This program acts just like figlet, but uses compressed fonts. It
  6. # requires the fonts to reside in the directory named in the variable
  7. # ZFONTDIR. Be sure to set up this variable before using the script.
  8. # The font is uncompressed prior to being used, then is compressed again
  9. # afterwards.
  10. #
  11. # Note: zfiglet cannot use fonts that are not in the directory specified
  12. # by ZFONTDIR.  In particular, zfiglet ignores the "-d" command line
  13. # option.
  14. #
  15. # Change "compress" and "uncompress" to "gzip" and "gunzip" if you
  16. # prefer to use gzip compression.  For extra-compressed files, use
  17. # "gzip -9" and "gunzip".
  18. #
  19. # Usage: zfiglet [ (figlet options) ]
  20.  
  21. # Set the following to the full pathname of your compressed font directory.
  22. ZFONTDIR="/home/symcom/chappell/zfonts"
  23. COMPRESSOR="compress"
  24. UNCOMPRESSOR="uncompress"
  25.  
  26. # Set up PATH so figlet can be found
  27. DIRSAVE=`pwd`
  28. cd `(dirname "$0") 2>/dev/null`
  29. PATH="$PATH":`pwd`
  30. cd "$DIRSAVE"
  31.  
  32. # Get figlet version
  33. FIGLETVERSION=`figlet -I1 2>/dev/null`
  34. if [ -z "$FIGLETVERSION" ]; then
  35.   FIGLETVERSION=20000
  36. fi
  37.  
  38. if [ $FIGLETVERSION -lt 20100 ]; then
  39.   echo "`basename $0`: requires figlet 2.1 or later" >&2
  40.   exit 1
  41. fi
  42.  
  43. FONT=$ZFONTDIR/`figlet $* -I3 2>/dev/null`.flf
  44. $UNCOMPRESSOR $FONT 2>/dev/null
  45. figlet $* -f $FONT
  46. $COMPRESSOR $FONT 2>/dev/null
  47.  
  48.